<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>客户导入管理</title>
	<meta name="decorator" content="default"/>
	<script src="${ctxStatic}/js/utils/Jutils.js"></script>
<script src="${ctxStatic}/layer/layer.js"></script>
<script src="http://www.jq22.com/jquery/jquery-migrate-1.2.1.min.js"></script>
<script src="${ctxStatic}/js/widget/jquery.jqprint-0.3.js"></script>
	<script src="${ctxStatic}/js/widget/spark-md5.min.js"></script>
<script src="${ctxStatic}/js/customerImportList.js"></script>
<script type="text/javascript">
	var WEBROOT={};
	WEBROOT.ctx="${pageContext.request.contextPath}${fns:getAdminPath()}";
	WEBROOT.ctxStatic="${pageContext.request.contextPath}"+"/static";
		function page(n,s){
			$("#pageNo").val(n);
			$("#pageSize").val(s);
			$("#searchForm").submit();
        	return false;
        }

	</script>
</head>
<body>

<!-- 导入弹窗end -->
	<ul class="nav nav-tabs">
		<li class="active"><a href="${ctx}/sys/customer/impt/customerImport/">客户导入列表</a></li>
		<shiro:hasPermission name="sys:customer.impt:customerImport:edit"><li><a href="${ctx}/sys/customer/impt/customerImport/form">客户导入添加</a></li></shiro:hasPermission>
	</ul>
	<form:form id="searchForm" modelAttribute="customerImport" action="${ctx}/sys/customer/impt/customerImport/" method="post" class="breadcrumb form-search">
		<input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
		<input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
		<ul class="ul-form">
			<li><label>批次号：</label>
				<form:input path="batchNo" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>姓名：</label>
				<form:input path="name" htmlEscape="false" maxlength="64" class="input-medium"/>
			</li>
			<li><label>数据类型：</label>
				<form:select path="type" htmlEscape="false" maxlength="255" class="input-medium">
				<form:option value="">全部类型</form:option>
				<form:option value="1">车辆信息类型</form:option>
				<form:option value="2">房产信息类型</form:option>
				<form:option value="3">信息不全类型</form:option>
				</form:select>
			</li>
			<li><label>手机号：</label>
				<form:input path="mobile" htmlEscape="false" maxlength="255" class="input-medium"/>
			</li>
			<li class="btns">
			<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
			<input id="btnExport" class="btn btn-primary" type="button" value="导出"/>
			<input id="btnImport1" class="btn btn-primary" type="button" value="导入"/>
			<input id="btnPrint" class="btn btn-primary" type="button" value="打印"/>
			</li>
			<li class="clearfix"></li>
		</ul>
	</form:form>
	<sys:message content="${message}"/>
	<table id="contentTable" class="table table-striped table-bordered table-condensed">
		<thead>
			<tr>
				<th>导入批次</th>
				<th>姓名</th>
				<th>手机号</th>
				<th>公司名</th>
				<th>地址</th>
				<th>房产信息</th>
				<th>车辆信息</th>
				<th>车牌</th>
				<th>数据类型</th>
				<th>导入文件名</th>
				<th>导入时间</th>
				<shiro:hasPermission name="sys:customer.impt:customerImport:edit"><th>操作</th></shiro:hasPermission>
			</tr>
		</thead>
		<tbody>
		<c:forEach items="${page.list}" var="customerImport">
			<tr>
				<td>
					${customerImport.batchNo}
				</td>
				<td><a href="${ctx}/sys/customer/impt/customerImport/form?id=${customerImport.id}">
					${customerImport.name}
				</a></td>
				<td>
					${customerImport.mobile}
				</td>
				<td>
					${customerImport.company}
				</td>
				<td>
					${customerImport.addr}
				</td>
				<td>
					${customerImport.housePropertyInfo}
				</td>
				<td>
					${customerImport.carInfo}	
				</td>
				<td>
					${customerImport.plateno}
				</td>
				<td>
					<c:choose>
						<c:when test="${ customerImport.type=='1'}"><span >车辆信息</span></c:when>
						<c:when test="${ customerImport.type=='2'}"><span >房产信息</span></c:when>
						<c:when test="${ customerImport.type=='3'}"><span >其他信息（资料不全）</span></c:when>
						<c:otherwise><span style="color:red">未知类型</span></c:otherwise>
					</c:choose> 
				</td>
				<td>
					${customerImport.remarks}
				</td>
				<td>
					<fmt:formatDate value="${customerImport.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/>
				</td>
			
				<shiro:hasPermission name="sys:customer.impt:customerImport:edit"><td>
    				<a href="${ctx}/sys/customer.impt/customerImport/form?id=${customerImport.id}">修改</a>
					<a href="${ctx}/sys/customer.impt/customerImport/delete?id=${customerImport.id}" onclick="return confirmx('确认要删除该客户导入吗？', this.href)">删除</a>
				</td></shiro:hasPermission>
			</tr>
		</c:forEach>
		</tbody>
	</table>
	<div class="pagination">${page}</div>
</body>
</html>